package com.minimalist.common.entity.lindi.po;

import com.minimalist.common.config.mybatis.InsertFullColumnHandler;
import com.minimalist.common.config.mybatis.UpdateFullColumnHandler;
import com.minimalist.common.config.mybatis.bo.BaseEntity;
import com.mybatisflex.annotation.Table;

import java.io.Serial;
import java.io.Serializable;

/**
 * 林地指标交易平台_省级公益林指标 实体类。
 *
 * @author 11987
 * @since 2025-05-13
 */
@Table(value = "LINDI_PROVINCE_INDEX", onInsert = InsertFullColumnHandler.class, onUpdate = UpdateFullColumnHandler.class)
public class LindiProvinceIndex extends BaseEntity implements Serializable{

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 省级公益林指标ID
     */
    private Long provinceIndexId;

    /**
     * 省级公益林指标亩数
     */
    private String provinceQuantity;

    /**
     * 省级公益林指标交易量
     */
    private String tradeQuantity;

    // 无参构造函数
    public LindiProvinceIndex() {
    }

    // 全参构造函数
    public LindiProvinceIndex(Long provinceIndexId, String provinceQuantity, String tradeQuantity) {
        this.provinceIndexId = provinceIndexId;
        this.provinceQuantity = provinceQuantity;
        this.tradeQuantity = tradeQuantity;
    }

    // Getter和Setter方法
    public Long getProvinceIndexId() {
        return provinceIndexId;
    }

    public void setProvinceIndexId(Long provinceIndexId) {
        this.provinceIndexId = provinceIndexId;
    }

    public String getProvinceQuantity() {
        return provinceQuantity;
    }

    public void setProvinceQuantity(String provinceQuantity) {
        this.provinceQuantity = provinceQuantity;
    }

    public String getTradeQuantity() {
        return tradeQuantity;
    }

    public void setTradeQuantity(String tradeQuantity) {
        this.tradeQuantity = tradeQuantity;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        LindiProvinceIndex that = (LindiProvinceIndex) o;
        return java.util.Objects.equals(provinceIndexId, that.provinceIndexId) &&
               java.util.Objects.equals(provinceQuantity, that.provinceQuantity) &&
               java.util.Objects.equals(tradeQuantity, that.tradeQuantity);
    }

    @Override
    public int hashCode() {
        return java.util.Objects.hash(super.hashCode(), provinceIndexId, provinceQuantity, tradeQuantity);
    }

    @Override
    public String toString() {
        return "LindiProvinceIndex{" +
               "provinceIndexId=" + provinceIndexId +
               ", provinceQuantity='" + provinceQuantity + '\'' +
               ", tradeQuantity='" + tradeQuantity + '\'' +
               "} " + super.toString();
    }

    // Builder类
    public static Builder builder() {
        return new Builder();
    }

    public static class Builder {
        private Long provinceIndexId;
        private String provinceQuantity;
        private String tradeQuantity;

        public Builder provinceIndexId(Long provinceIndexId) {
            this.provinceIndexId = provinceIndexId;
            return this;
        }

        public Builder provinceQuantity(String provinceQuantity) {
            this.provinceQuantity = provinceQuantity;
            return this;
        }

        public Builder tradeQuantity(String tradeQuantity) {
            this.tradeQuantity = tradeQuantity;
            return this;
        }

        public LindiProvinceIndex build() {
            return new LindiProvinceIndex(provinceIndexId, provinceQuantity, tradeQuantity);
        }
    }

}
